﻿using System;
using System.Collections;
using System.Collections.Generic;
using OWL.Rendering.HRP;
using UnityEngine;
using Yoozoo.HRP.Runtime;

public class RpgBattleSceneData : MonoBehaviour
{
    //场景相关gameObject
    public List<MeshRenderer> meshList = new List<MeshRenderer>();
    public List<int> lightMapIndexList = new List<int>();
    public List<Vector4> lightMapOffsetList = new List<Vector4>();
    public List<string> lightMapPath = new List<string>();
    public List<string> lightMapDirPath = new List<string>();
    public List<Texture2D> lightMapTextures = new List<Texture2D>();
    public List<Texture2D> lightMapDirTextures = new List<Texture2D>();
    public List<ReflectionProbe> reflectionProbes = new List<ReflectionProbe>();
    public List<Cubemap> reflectionProbesTextures = new List<Cubemap>();
    public GameObject lightingSetting;

    //掩体点位
    public List<Vector3> hidePoints = new List<Vector3>();
    public List<Vector3> attackPoints = new List<Vector3>();
    
    //主角区域
    public Vector3 mainUnitRegionCenter;
    public float mainUnitRegionLeft;
    public float mainUnitRegionRight;
    public float mainUnitRegionTop;
    public float mainUnitRegionBottom;
    public float mainUnitRegionAngle;
    
    //近战
    public Vector3 meleeLineCenter;
    public float meleeLineAngle;
    public float meleeLineDistance;
    
    //a星区域
    public Vector3 aStarCenter;
    public int aStarWidth;
    public int aStarHeight;

    //实际地图区域
    public float battleRegionWidth;
    public float battleRegionHeight;
    public HBaseRenderScene renderScene;
    
    //位置
    public bool overridePosition;
    public Vector3 position;

    public Vector3 rotation;
    public Vector3 battleForward;
    
    //阻挡点
    public List<Vector3> blocks;
    
    //相机参数
    public bool overrideCamera;
    public Vector3 leftCameraPoint;
    public float leftCameraPointScreenXRatio;
    public float deckLeftCameraPointScreenXRatio;
    
    public Camera sideCamera;

    //背身相机参数
    public bool hasBackCamera;
    public Camera backCamera;
    
    //布阵相机
    public bool overrideDeckCamera;
    public Camera deckCamera;
    
    //战斗结束的相机
    public Camera battleEndCamera;
    
    //人物位置
    public bool overrideUnits;
    public List<Vector3> selfPositions = new List<Vector3>();
    public List<Vector3> selfForwards = new List<Vector3>();
    public Vector3 selfAssistPosition;
    
    public List<Vector3> enemyPositions = new List<Vector3>();
    public List<Vector3> enemyForwards = new List<Vector3>();
    public Vector3 enemyAssistPosition;
    
    //雾
    public bool fog;
    public Color fogColor;
    public float fogDensity;
    public FogMode fogMode;
    public float fogStartDistance;
    public float fogEndDistance;

    public string singleLandscapePath;

    public List<GameObject> specialObjects = new List<GameObject>();

    public List<GameObject> effectSounds = new List<GameObject>();

    public List<int> enemyPathId = new List<int>();
    public List<RpgBattleSceneEnemyPath> enemyPaths = new List<RpgBattleSceneEnemyPath>();

    public float propRegionWidth;
    public float propRegionHeight;
    public float propRegionSize;
    
    private void Awake()
    {
        lightingSetting = HRPHelper.RpgRenderScene.gameObject;
    }
}
